package com.glw.sso.platform.web.controller;


import com.glw.sso.platform.common.base.BaseController;
import com.glw.sso.platform.common.response.Response;
import com.glw.sso.platform.domain.entity.Subsystem;
import com.glw.sso.platform.service.SubsystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * <p>
 * 系统部门与员工关系表 前端控制器
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-10-31
 */
@RestController
@RequestMapping("/api/subsystem")
public class SubsystemController extends BaseController<SubsystemService, Subsystem> {

    @Autowired
    public SubsystemService subsystemService;

    @Override
    protected SubsystemService getService() {
        return subsystemService;
    }

    @Override
    public Response save(Subsystem entity) {
        entity.setUuid(UUID.randomUUID().toString());
        return super.save(entity);
    }
}
